class CreateTasks < ActiveRecord::Migration
  def self.up
    create_table :tasks do |t|
      t.string :name
      t.integer :enterprise_id,
        :executor_id,
        :initiator_id,
        :order_item_id,
        :feed_id
      t.string :visible_scope, :default => 'only_myself'
      t.string :type_name, :default => '提醒'
      t.date :due_on  
      t.string :status, :default => 'waiting'
      t.timestamps
    end
  end

  def self.down
    drop_table :tasks
  end
end
